package cola0502.project.hellospringbootcola0502.controller;

import cola0502.project.hellospringbootcola0502.service.ColaAwareService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
@RequestMapping("/v1/api/ColaAwares")
public class ColaAwareController {

    @Resource
    ColaAwareService colaAwareService;

    @GetMapping("testSetBeanNameAware")
    public String testSetBeanNameAware() {
        colaAwareService.setBeanName("ColaBean");
        return "testSetBeanNameAware";
    }
}
